{include file="pub_header.htm"}
<div class="out_table">
<table width="100%" cellpadding="6" cellspacing="6" border="0" align="center" class="frame_table">
  <tr>
    <td width="20%" align="center" valign="top" bgcolor="#EEEEEE">
      {include file="pub_submenu.htm"}
    </td>
    <td width="80%" align="center" valign="top" bgcolor="#FFFFFF">

      {if $get.ope == "add"}
      <div class="right_table">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="current_place">
        <tr>
          <td align="left" nowrap>&nbsp;
            <a href="{$control_admin}" target="_self" class="current_place">管理首页</a>
            &raquo; <a href="{$control_admin}?act=channel&channel_id=0" target="_self" class="current_place">版块管理</a>
            {foreach name=channel_current from=$channel_current item=channel_current}
            &raquo; <a href="{$control_admin}?act=channel&channel_id={$channel_current.id}" target="_self" class="current_place">{$channel_current.name|str_entag:'space,br'}</a>
            {/foreach}
            &raquo; <a href="{$control_admin}?act=channel&ope=add&channel_id={$get.channel_id}&pag={$get.pag}" target="_self" class="current_place">添加版块</a>
          </td>
          <td align="right" nowrap>
            [
            <a href="{$control_admin}?act=channel" target="_self" class="current_place">版块列表</a>
            ]
          </td>
        </tr>
      </table>
      </div>

      <div class="space"></div>
      <div class="right_table">
      <form id="channel_add" name="channel_add" method="post" action="javascript:void(null);" enctype="multipart/form-data">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="block_group">
        <tr align="left" class="block_header">
          <td colspan="3">添加版块</td>
        </tr>
        <tr align="left">
          <td width="10%" class="block_left">类型</td>
          <td width="60%" class="block_right">
            <input type="radio" name="type" value="1" class="radio_y" checked>&nbsp;论坛
            <input type="radio" name="type" value="2" class="radio_n">&nbsp;分区
          </td>
          <td width="30%" class="block_right"><span id="type_return"><span class="prompt_primal">类型为论坛还是分区</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">名称</td>
          <td class="block_right"><input type="text" name="name" maxlength="30" size="80" style="width:420px;" value="" class="input"></td>
          <td class="block_right"><span id="name_return"><span class="prompt_primal">版块名称</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">访问密码</td>
          <td class="block_right"><input type="text" name="password" maxlength="30" size="80" style="width:420px;" value="" class="input"></td>
          <td class="block_right"><span id="password_return"><span class="prompt_primal">访问本版块必须输入的密码</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">简介</td>
          <td class="block_right"><textarea name="brief" rows="6" cols="80" style="width:420px;" class="textarea"></textarea></td>
          <td class="block_right"><span id="brief_return"><span class="prompt_primal">对此版块的简介,显示于版块列表处</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">通告</td>
          <td colspan="2" class="block_right"><textarea rows="18" cols="80" style="width:420px;" id="notice" name="notice" class="textarea"></textarea><span id="notice_return"><span class="prompt_primal">此版块通告,显示在版块帖子列表上方</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">关键字</td>
          <td class="block_right"><input type="text" id="keyword" name="keyword" maxlength="255" size="80" style="width:420px;" value="" class="input"></td>
          <td class="block_right"><span id="keyword_return"><span class="prompt_primal">关键字列表,以","分隔</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">封面图片</td>
          <td colspan="2" class="block_right">
          <table width="100%" border="0" cellspacing="0" cellpadding="1" bgcolor="#FDF4E3">
            <tr>
              <td colspan="4" align="left">
                允许的文件类型:[{$setting_cover.type|implode_str:"|"}]
              </td>
            </tr>
            <tr>
              <td width="5%" rowspan="2" align="center"><span id="cover_str" name="cover_str">{$cover_str}</span></td>
              <td width="25%" align="left">
                <span id="cover_upload_input" name="cover_upload_input">
                  <input type="file" id="cover_upload" name="cover_upload" size="30" style="width:250px;" class="input" />
                </span>
              </td>
              <td width="10%" align="left">
                <input type="button" id="cover_upload_submit" name="cover_upload_submit" value="本地上传" class="button" onClick="xajax.$('cover_upload_submit').disabled=true;xajax_upload_submit('channel_add','{$control_admin}?act=channel&ope=savecover_upload&type=add&channel_id={$admin.mid}','cover_upload_prompt');">
              </td>
              <td width="60%" align="left">
                <span id="cover_upload_prompt" name="cover_upload_prompt"></span>
              </td>
            </tr>
            <tr>
              <td width="25%" align="left">
                <span id="cover_get_input" name="cover_get_input">
                  <input type="text" id="cover_get" name="cover_get" size="45" style="width:250px;" class="input" />
                </span>
              </td>
              <td width="10%" align="left">
                <input type="button" id="cover_get_submit" name="cover_get_submit" value="地址获取" class="button" onClick="xajax.$('cover_get_submit').disabled=true;xajax_cover_get('add','{$admin.mid}','cover_get',cover_get.value,'cover_get_submit','cover_str','cover_get_prompt');">
              </td>
              <td width="60%" align="left">
                <span id="cover_get_prompt" name="cover_get_prompt"></span>
              </td>
            </tr>
          </table>
          </td>
        </tr>
        <tr align="left">
          <td class="block_left">版块模板</td>
          <td class="block_right"><input type="text" name="template_channel" maxlength="255" size="80" style="width:420px;" value="" class="input"></td>
          <td class="block_right"><span id="template_channel_return"><span class="prompt_primal">本版块采用的模板,留空为采用默认</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">帖子模板</td>
          <td class="block_right"><input type="text" name="template_topic" maxlength="255" size="80" style="width:420px;" value="" class="input"></td>
          <td class="block_right"><span id="template_topic_return"><span class="prompt_primal">本版块帖子页面采用的模板,留空为采用默认</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">横向分类</td>
          <td class="block_right">
          <table cellspacing="0" cellpadding="1" border="0">
            {foreach name=trans_group from=$trans_group item=trans_group}
            <tr>
              <td class="block_left"><input type="checkbox" name="trans_group[{$trans_group.id}][check]" value="1">{$trans_group.name|str_entag:'space,br'}</td>
              <td>
                必填:<input type="checkbox" name="trans_group[{$trans_group.id}][if_must]" value="1">
                排序:<input type="text" name="trans_group[{$trans_group.id}][rank]" maxlength="11" size="6" value="0" class="input">
              </td>
              <td><span id="trans_group_return{$trans_group.id}_return"><span class="prompt_primal"></span></span></td>
            </tr>
            {/foreach}
          </table>
          </td>
          <td class="block_right">横向分类的设定</td>
        </tr>
        <tr align="left">
          <td class="block_left">状态</td>
          <td class="block_right">
            <input type="radio" name="if_enable" value="1" class="radio_y" checked>&nbsp;开启
            <input type="radio" name="if_enable" value="2" class="radio_n">&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_enable_return"><span class="prompt_primal">是否开启此版块</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">锁定</td>
          <td class="block_right">
            <input type="radio" name="if_lock" value="1" class="radio_y">&nbsp;开启
            <input type="radio" name="if_lock" value="2" class="radio_n" checked>&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_lock_return"><span class="prompt_primal">是否锁定此版块,锁定后不能发帖回帖</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">显示</td>
          <td class="block_right">
            <input type="radio" name="if_show" value="1" class="radio_y" checked>&nbsp;开启
            <input type="radio" name="if_show" value="2" class="radio_n">&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_show_return"><span class="prompt_primal">是否显示此版块</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">推荐</td>
          <td class="block_right">
            <input type="radio" name="if_recommend" value="1" class="radio_y">&nbsp;开启
            <input type="radio" name="if_recommend" value="2" class="radio_n" checked>&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_recommend_return"><span class="prompt_primal">是否开启推荐</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">发帖</td>
          <td class="block_right">
            <input type="radio" name="if_add" value="1" class="radio_y" checked>&nbsp;开启
            <input type="radio" name="if_add" value="2" class="radio_n">&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_add_return"><span class="prompt_primal">是否开启此版块发帖</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">游客</td>
          <td class="block_right">
            <input type="radio" name="if_guest" value="1" class="radio_y">&nbsp;开启
            <input type="radio" name="if_guest" value="2" class="radio_n" checked>&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_guest_return"><span class="prompt_primal">是否开启游客发帖</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">匿名</td>
          <td class="block_right">
            <input type="radio" name="if_anonymous" value="1" class="radio_y">&nbsp;开启
            <input type="radio" name="if_anonymous" value="2" class="radio_n" checked>&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_anonymous_return"><span class="prompt_primal">是否开启匿名发帖</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">关键词</td>
          <td class="block_right">
            <input type="radio" name="if_splitword" value="1" class="radio_y" checked>&nbsp;开启
            <input type="radio" name="if_splitword" value="2" class="radio_n">&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_splitword_return"><span class="prompt_primal">是否允许自动提取关键词</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">表情</td>
          <td class="block_right">
            <input type="radio" name="if_face" value="1" class="radio_y" checked>&nbsp;开启
            <input type="radio" name="if_face" value="2" class="radio_n">&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_face_return"><span class="prompt_primal">是否允许识别表情符号</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">BBCODE</td>
          <td class="block_right">
            <input type="radio" name="if_bbcode" value="1" class="radio_y" checked>&nbsp;开启
            <input type="radio" name="if_bbcode" value="2" class="radio_n">&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_bbcode_return"><span class="prompt_primal">是否允许识别BBCODE</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">URL</td>
          <td class="block_right">
            <input type="radio" name="if_url" value="1" class="radio_y" checked>&nbsp;开启
            <input type="radio" name="if_url" value="2" class="radio_n">&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_url_return"><span class="prompt_primal">是否允许识别URL网址</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">HTML</td>
          <td class="block_right">
            <input type="radio" name="if_html" value="1" class="radio_y">&nbsp;开启
            <input type="radio" name="if_html" value="2" class="radio_n" checked>&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_html_return"><span class="prompt_primal">是否允许解析HTML</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">每页</td>
          <td class="block_right"><input type="text" name="page_record" maxlength="11" size="20" style="width:120px;" value="20" class="input"></td>
          <td class="block_right"><span id="page_record_return"><span class="prompt_primal">每页显示多少条记录</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">排序</td>
          <td class="block_right"><input type="text" name="rank" maxlength="11" size="20" style="width:120px;" value="0" class="input"></td>
          <td class="block_right"><span id="rank_return"><span class="prompt_primal">排序</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">版主列表</td>
          <td class="block_right">&nbsp;</td>
          <td class="block_right">请添加后使用编辑功能管理版主</td>
        </tr>
        <tr align="left">
          <td class="block_left">跳转网址</td>
          <td class="block_right">
            <input type="checkbox" id="if_turn" name="if_turn" value="1" onclick="xajax_channel_if_turn('if_turn_detail', this.checked, '');">
            <span id="if_turn_detail" style="display:none;">
              <select id="if_turn_type" name="if_turn_type" class="select" style="width:70px;">
                <option value="1" selected="selected">_blank</option>
                <option value="2">_self</option>
              </select>
              <input type="text" id="if_turn_url" name="if_turn_url" size="60" style="width:320px;" maxlength="255" value="" class="input" />
            </span>
          </td>
          <td class="block_right"><span id="if_turn_detail_return"><span class="prompt_primal">是否跳转到某网址</span></span></td>
        </tr>
        <tr>
          <td colspan="3" align="center" class="block_footer">
          <input type="button" id="sort_submit" name="sort_submit" value="添加" class="button"
            onclick="xajax.$('sort_submit').disabled=true;
                     xajax.$('sort_submit').value='请等待...';
                     xajax.$('notice').value = CKEDITOR.instances.notice.getData();
                     xajax_submit_form('add',xajax.getFormValues('channel_add'),'sort_submit');">
          </td>
        </tr>
      </table>
      </form>
      </div>
      {elseif $get.ope == "amend"}
      <div class="right_table">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="current_place">
        <tr>
          <td align="left" nowrap>&nbsp;
            <a href="{$control_admin}" target="_self" class="current_place">管理首页</a>
            &raquo; <a href="{$control_admin}?act=channel&channel_id=0" target="_self" class="current_place">版块管理</a>
            {foreach name=channel_current from=$channel_current item=channel_current}
            &raquo; <a href="{$control_admin}?act=channel&channel_id={$channel_current.id}" target="_self" class="current_place">{$channel_current.name|str_entag:'space,br'}</a>
            {/foreach}
            &raquo; <a href="{$control_admin}?act=channel&ope=amend&channel_id={$get.channel_id}&pag={$get.pag}" target="_self" class="current_place">编辑版块</a>
          </td>
          <td align="right" nowrap>
            [
            <a href="{$control_admin}?act=channel" target="_self" class="current_place">版块列表</a>
            ]
          </td>
        </tr>
      </table>
      </div>

      <div class="space"></div>
      <div class="right_table">
      <form id="channel_amend" name="channel_amend" method="post" action="javascript:void(null);" enctype="multipart/form-data">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="block_group">
        <tr align="left" class="block_header">
          <td colspan="3">编辑版块</td>
        </tr>
        <tr align="left">
          <td width="10%" class="block_left">ID</td>
          <td width="60%" class="block_right">{$channel_info.id}</td>
          <td width="30%" class="block_right"></td>
        </tr>
        <tr align="left">
          <td class="block_left">类型</td>
          <td class="block_right">
            <input type="radio" name="type" value="1" {if $channel_info.type == "1"}checked{/if} class="radio_y">&nbsp;论坛
            <input type="radio" name="type" value="2" {if $channel_info.type != "1"}checked{/if} class="radio_n">&nbsp;分区
          </td>
          <td class="block_right"><span id="type_return"><span class="prompt_primal">类型为论坛还是分区</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">名称</td>
          <td class="block_right"><input type="text" name="name" maxlength="30" size="80" style="width:420px;" value="{$channel_info.name|str_entag}" class="input"></td>
          <td class="block_right"><span id="name_return"><span class="prompt_primal">版块名称</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">访问密码</td>
          <td class="block_right"><input type="text" name="password" maxlength="30" size="80" style="width:420px;" value="{$channel_info.password}" class="input"></td>
          <td class="block_right"><span id="password_return"><span class="prompt_primal">访问本版块必须输入的密码</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">简介</td>
          <td class="block_right"><textarea name="brief" rows="6" cols="80" style="width:420px;" class="textarea">{$channel_info.brief|str_entag}</textarea></td>
          <td class="block_right"><span id="brief_return"><span class="prompt_primal">对此版块的简介,显示于版块列表处</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">通告</td>
          <td colspan="2" class="block_right"><textarea rows="18" cols="80" style="width:420px;" id="notice" name="notice" class="textarea">{$channel_info.notice}</textarea><span id="notice_return"><span class="prompt_primal">此版块通告,显示在版块帖子列表上方</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">关键字</td>
          <td class="block_right"><input type="text" id="keyword" name="keyword" maxlength="255" size="80" style="width:420px;" value="{$channel_info.keyword}" class="input"></td>
          <td class="block_right"><span id="keyword_return"><span class="prompt_primal">关键字列表,以","分隔</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">封面图片</td>
          <td colspan="2" class="block_right">
          <table width="100%" border="0" cellspacing="0" cellpadding="1" bgcolor="#FDF4E3">
            <tr>
              <td colspan="4" align="left">
                允许的文件类型:[{$setting_cover.type|implode_str:"|"}]
              </td>
            </tr>
            <tr>
              <td width="5%" rowspan="2" align="center"><span id="cover_str" name="cover_str">{$cover_str}</span></td>
              <td width="25%" align="left">
                <span id="cover_upload_input" name="cover_upload_input">
                  <input type="file" id="cover_upload" name="cover_upload" size="30" style="width:250px;" class="input" />
                </span>
              </td>
              <td width="10%" align="left">
                <input type="button" id="cover_upload_submit" name="cover_upload_submit" value="本地上传" class="button" onClick="xajax.$('cover_upload_submit').disabled=true;xajax_upload_submit('channel_amend','{$control_admin}?act=channel&ope=savecover_upload&type=amend&channel_id={$channel_info.id}','cover_upload_prompt');">
              </td>
              <td width="60%" align="left">
                <span id="cover_upload_prompt" name="cover_upload_prompt"></span>
              </td>
            </tr>
            <tr>
              <td width="25%" align="left">
                <span id="cover_get_input" name="cover_get_input">
                  <input type="text" id="cover_get" name="cover_get" size="45" style="width:250px;" class="input" />
                </span>
              </td>
              <td width="10%" align="left">
                <input type="button" id="cover_get_submit" name="cover_get_submit" value="地址获取" class="button" onClick="xajax.$('cover_get_submit').disabled=true;xajax_cover_get('amend','{$channel_info.id}','cover_get',cover_get.value,'cover_get_submit','cover_str','cover_get_prompt');">
              </td>
              <td width="60%" align="left">
                <span id="cover_get_prompt" name="cover_get_prompt"></span>
              </td>
            </tr>
          </table>
          </td>
        </tr>
        <tr align="left">
          <td class="block_left">版块模板</td>
          <td class="block_right"><input type="text" name="template_channel" maxlength="255" size="80" style="width:420px;" value="{$channel_info.template_channel}" class="input"></td>
          <td class="block_right"><span id="template_channel_return"><span class="prompt_primal">本版块采用的模板,留空为采用默认</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">帖子模板</td>
          <td class="block_right"><input type="text" name="template_topic" maxlength="255" size="80" style="width:420px;" value="{$channel_info.template_topic}" class="input"></td>
          <td class="block_right"><span id="template_topic_return"><span class="prompt_primal">本版块帖子页面采用的模板,留空为采用默认</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">横向分类</td>
          <td class="block_right">
          <table cellspacing="0" cellpadding="1" border="0">
            {foreach name=trans_group from=$trans_group item=trans_group}
            {if $trans_group.id|in_array_key:$trans_list}
            <tr>
              <td class="block_left"><input type="checkbox" name="trans_group[{$trans_group.id}][check]" value="1" checked>{$trans_group.name|str_entag:'space,br'}</td>
              <td>
                必填:<input type="checkbox" name="trans_group[{$trans_group.id}][if_must]" value="1" {if $trans_list[$trans_group.id].if_must == "1"}checked{/if}>
                排序:<input type="text" name="trans_group[{$trans_group.id}][rank]" maxlength="11" size="6" value="{$trans_list[$trans_group.id].rank}" class="input">
              </td>
              <td><span id="trans_group_return{$trans_group.id}_return"><span class="prompt_primal"></span></span></td>
            </tr>
            {else}
            <tr>
              <td class="block_left"><input type="checkbox" name="trans_group[{$trans_group.id}][check]" value="1">{$trans_group.name|str_entag:'space,br'}</td>
              <td>
                必填:<input type="checkbox" name="trans_group[{$trans_group.id}][if_must]" value="1">
                排序:<input type="text" name="trans_group[{$trans_group.id}][rank]" maxlength="11" size="6" value="0" class="input">
              </td>
              <td><span id="trans_group_return{$trans_group.id}_return"><span class="prompt_primal"></span></span></td>
            </tr>
            {/if}
            {/foreach}
          </table>
          </td>
          <td class="block_right">横向分类的设定</td>
        </tr>
        <tr align="left">
          <td class="block_left">状态</td>
          <td class="block_right">
            <input type="radio" name="if_enable" value="1" {if $channel_info.if_enable == "1"}checked{/if} class="radio_y">&nbsp;开启
            <input type="radio" name="if_enable" value="2" {if $channel_info.if_enable != "1"}checked{/if} class="radio_n">&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_enable_return"><span class="prompt_primal">是否开启此版块</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">锁定</td>
          <td class="block_right">
            <input type="radio" name="if_lock" value="1" {if $channel_info.if_lock == "1"}checked{/if} class="radio_y">&nbsp;开启
            <input type="radio" name="if_lock" value="2" {if $channel_info.if_lock != "1"}checked{/if} class="radio_n">&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_lock_return"><span class="prompt_primal">是否锁定此版块,锁定后不能发帖回帖</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">显示</td>
          <td class="block_right">
            <input type="radio" name="if_show" value="1" {if $channel_info.if_show == "1"}checked{/if} class="radio_y">&nbsp;开启
            <input type="radio" name="if_show" value="2" {if $channel_info.if_show != "1"}checked{/if} class="radio_n">&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_show_return"><span class="prompt_primal">是否显示此版块</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">推荐</td>
          <td class="block_right">
            <input type="radio" name="if_recommend" value="1" {if $channel_info.if_recommend == "1"}checked{/if} class="radio_y">&nbsp;开启
            <input type="radio" name="if_recommend" value="2" {if $channel_info.if_recommend != "1"}checked{/if} class="radio_n">&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_recommend_return"><span class="prompt_primal">是否开启推荐</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">发帖</td>
          <td class="block_right">
            <input type="radio" name="if_add" value="1" {if $channel_info.if_add == "1"}checked{/if} class="radio_y">&nbsp;开启
            <input type="radio" name="if_add" value="2" {if $channel_info.if_add != "1"}checked{/if} class="radio_n">&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_add_return"><span class="prompt_primal">是否开启此版块发帖</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">游客</td>
          <td class="block_right">
            <input type="radio" name="if_guest" value="1" {if $channel_info.if_guest == "1"}checked{/if} class="radio_y">&nbsp;开启
            <input type="radio" name="if_guest" value="2" {if $channel_info.if_guest != "1"}checked{/if} class="radio_n">&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_guest_return"><span class="prompt_primal">是否开启游客发帖</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">匿名</td>
          <td class="block_right">
            <input type="radio" name="if_anonymous" value="1" {if $channel_info.if_anonymous == "1"}checked{/if} class="radio_y">&nbsp;开启
            <input type="radio" name="if_anonymous" value="2" {if $channel_info.if_anonymous != "1"}checked{/if} class="radio_n">&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_anonymous_return"><span class="prompt_primal">是否开启匿名发帖</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">关键词</td>
          <td class="block_right">
            <input type="radio" name="if_splitword" value="1" {if $channel_info.if_splitword == "1"}checked{/if} class="radio_y">&nbsp;开启
            <input type="radio" name="if_splitword" value="2" {if $channel_info.if_splitword != "1"}checked{/if} class="radio_n">&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_splitword_return"><span class="prompt_primal">是否允许自动提取关键词</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">表情</td>
          <td class="block_right">
            <input type="radio" name="if_face" value="1" {if $channel_info.if_face == "1"}checked{/if} class="radio_y">&nbsp;开启
            <input type="radio" name="if_face" value="2" {if $channel_info.if_face != "1"}checked{/if} class="radio_n">&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_face_return"><span class="prompt_primal">是否允许识别表情符号</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">BBCODE</td>
          <td class="block_right">
            <input type="radio" name="if_bbcode" value="1" {if $channel_info.if_bbcode == "1"}checked{/if} class="radio_y">&nbsp;开启
            <input type="radio" name="if_bbcode" value="2" {if $channel_info.if_bbcode != "1"}checked{/if} class="radio_n">&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_bbcode_return"><span class="prompt_primal">是否允许识别BBCODE</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">URL</td>
          <td class="block_right">
            <input type="radio" name="if_url" value="1" {if $channel_info.if_url == "1"}checked{/if} class="radio_y">&nbsp;开启
            <input type="radio" name="if_url" value="2" {if $channel_info.if_url != "1"}checked{/if} class="radio_n">&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_url_return"><span class="prompt_primal">是否允许识别URL网址</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">HTML</td>
          <td class="block_right">
            <input type="radio" name="if_html" value="1" {if $channel_info.if_html == "1"}checked{/if} class="radio_y">&nbsp;开启
            <input type="radio" name="if_html" value="2" {if $channel_info.if_html != "1"}checked{/if} class="radio_n">&nbsp;关闭
          </td>
          <td class="block_right"><span id="if_html_return"><span class="prompt_primal">是否允许解析HTML</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">每页</td>
          <td class="block_right"><input type="text" name="page_record" maxlength="11" size="20" style="width:120px;" value="{$channel_info.page_record}" class="input"></td>
          <td class="block_right"><span id="page_record_return"><span class="prompt_primal">每页显示多少条记录</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">排序</td>
          <td class="block_right"><input type="text" name="rank" maxlength="11" size="20" style="width:120px;" value="{$channel_info.rank}" class="input"></td>
          <td class="block_right"><span id="rank_return"><span class="prompt_primal">排序</span></span></td>
        </tr>
        <tr align="left">
          <td class="block_left">版主列表</td>
          <td class="block_right">
            {foreach name=channel_manage_list from=$channel_manage_list item=item}
            <a href="{$control_admin}?act=admin&ope=amend&aid={$item.admin_id}" target="_blank"><span style="{if $item.color != ''}color:{$item.color_value};{/if}{if $item.bold == '1'}font-weight:bold;{/if}">{$item.username}</span></a>
            {/foreach}
          </td>
          <td class="block_right"><a href="{$control_admin}?act=manage&channel_id={$get.channel_id}" target="_blank">[管理此版块版主]</a></td>
        </tr>
        <tr align="left">
          <td class="block_left">跳转网址</td>
          <td class="block_right">
            <input type="checkbox" id="if_turn" name="if_turn" value="1" {if $channel_info.if_turn == "1"}checked="checked"{/if} onclick="xajax_channel_if_turn('if_turn_detail', this.checked, 'form_detail');">
            <span id="if_turn_detail" style="display:none;">
              <select id="if_turn_type" name="if_turn_type" class="select" style="width:70px;">
                <option value="1" {if $channel_info.if_turn_type != "2"}selected="selected"{/if}>_blank</option>
                <option value="2" {if $channel_info.if_turn_type == "2"}selected="selected"{/if}>_self</option>
              </select>
              <input type="text" id="if_turn_url" name="if_turn_url" size="60" style="width:320px;" maxlength="255" value="{$channel_info.if_turn_url}" class="input" />
            </span>
          </td>
          <td class="block_right"><span id="if_turn_detail_return"><span class="prompt_primal">是否跳转到某网址</span></span></td>
        </tr>
        <tr>
          <td colspan="3" align="center" class="block_footer">
          <input type="button" id="sort_submit" name="sort_submit" value="编辑" class="button"
            onclick="xajax.$('sort_submit').disabled=true;
                     xajax.$('sort_submit').value='请等待...';
                     xajax.$('notice').value = CKEDITOR.instances.notice.getData();
                     xajax_submit_form('amend',xajax.getFormValues('channel_amend'),'sort_submit');">
          </td>
        </tr>
      </table>
      </form>
      </div>
      {elseif $get.ope == "move"}
      <div class="right_table">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="current_place">
        <tr>
          <td align="left" nowrap>&nbsp;
            <a href="{$control_admin}" target="_self" class="current_place">管理首页</a>
            &raquo; <a href="{$control_admin}?act=channel&channel_id=0" target="_self" class="current_place">版块管理</a>
            {foreach name=channel_current from=$channel_current item=channel_current}
            &raquo; <a href="{$control_admin}?act=channel&channel_id={$channel_current.id}" target="_self" class="current_place">{$channel_current.name|str_entag:'space,br'}</a>
            {/foreach}
            &raquo; <a href="{$control_admin}?act=channel&ope=move&channel_id={$get.channel_id}&pag={$get.pag}" target="_self" class="current_place">移动版块</a>
          </td>
          <td align="right" nowrap>
            [
            <a href="{$control_admin}?act=channel" target="_self" class="current_place">版块列表</a>
            ]
          </td>
        </tr>
      </table>
      </div>

      <div class="space"></div>
      <div class="right_table">
      <form action="{$control_admin}?act=channel&ope=save_move&channel_id={$get.channel_id}&pag={$get.pag}" method="post" id="sort_move" name="sort_move">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="block_group">
        <tr align="left" class="block_header">
          <td>移动版块</td>
        </tr>
        <tr align="left">
          <td align="left">
          <table border="0" cellspacing="1" cellpadding="3">
            <tr>
              <td>
              <select name="sort_tree_from" size="16" disabled>
                {foreach name=sort_tree_from from=$sort_tree_from item=sort_tree_from}
                  {if $sort_tree_from.selected=="1"}
                  <option value="{$sort_tree_from.id}" selected="selected">{$sort_tree_from.name|indent:$sort_tree_from.depth:"&nbsp;&nbsp;"}</option>
                  {else}
                  <option value="{$sort_tree_from.id}">{$sort_tree_from.name|indent:$sort_tree_from.depth:"&nbsp;&nbsp;"}</option>
                  {/if}
                {/foreach}
              </select>
              </td>
              <td>移动到 &raquo;</td>
              <td>
              <select name="sort_tree_to" size="16">
                {if $sort_tree_to_root == "disable"}
                <optgroup label="根目录"></optgroup>
                {else}
                <option value="0">根目录</option>
                {/if}
                <optgroup label="------------"></optgroup>
                {foreach name=sort_tree_to from=$sort_tree_to item=sort_tree_to}
                  {if $sort_tree_to.disable=="1"}
                  <optgroup label="{$sort_tree_to.name|indent:$sort_tree_to.depth:"&nbsp;&nbsp;"}"></optgroup>
                  {else}
                  <option value="{$sort_tree_to.id}">{$sort_tree_to.name|indent:$sort_tree_to.depth:"&nbsp;&nbsp;"}</option>
                  {/if}
                {/foreach}
              </select>
              </td>
            </tr>
          </table>
          </td>
        </tr>
        <tr>
          <td colspan="3" align="center" class="block_footer">
          <input type="submit" name="submit" value="移动" class="submit">
          </td>
        </tr>
      </table>
      </form>
      </div>
      {else}
      <div class="right_table">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="current_place">
        <tr>
          <td align="left" nowrap>&nbsp;
            <a href="{$control_admin}" target="_self" class="current_place">管理首页</a>
            &raquo; <a href="{$control_admin}?act=channel&channel_id=0" target="_self" class="current_place">版块管理</a>
            {foreach name=channel_current from=$channel_current item=channel_current}
            &raquo; <a href="{$control_admin}?act=channel&channel_id={$channel_current.id}" target="_self" class="current_place">{$channel_current.name|str_entag:'space,br'}</a>
            {/foreach}
          </td>
          <td align="right" nowrap>
            [
            <a href="{$control_admin}?act=channel&ope=add&channel_id={$get.channel_id}&pag={$get.pag}" target="_self" class="current_place">添加版块</a>
            ]
          </td>
        </tr>
      </table>
      </div>

      <div class="space"></div>
      <div class="right_table">
      <table width="100%" cellpadding="3" cellspacing="0" border="0" align="center" class="block_group">
        <tr align="left" class="block_header">
          <td colspan="13">版块列表</td>
        </tr>
        <tr class="block_title">
          <td width="5%" nowrap>ID</td>
          <td width="49%" align="left">名称</td>
          <td width="5%" nowrap>每页</td>
          <td width="5%" nowrap>排序</td>
          <td width="5%" nowrap>转向</td>
          <td width="3%" nowrap>状态</td>
          <td width="3%" nowrap>锁定</td>
          <td width="3%" nowrap>显示</td>
          <td width="3%" nowrap>推荐</td>
          <td width="3%" nowrap>发帖</td>
          <td width="3%" nowrap>游客</td>
          <td width="3%" nowrap>匿名</td>
          <td width="10%" nowrap>操作</td>
        </tr>
        {foreach name=channel_sub from=$channel_sub item=item}
        {if $admin.ag_privilege.channel == "1" || ($admin.ag_privilege.channel == "3" && $item.channel_manage_admin_id != "")}
        <tr align="center" class="block_list" onmouseover="this.className='block_list_over'" onmouseout="this.className='block_list'">
          <td nowrap>{$item.id}</td>
          <td align="left">
          {if $item.type == "2"}
          <img id="type" border="0" align="absmiddle" src="{$dir_images_admin}/icon_folder.gif" alt="分区" title="类型为分区">
          {else}
          <img id="type" border="0" align="absmiddle" src="{$dir_images_admin}/icon_topic.gif" alt="论坛" title="类型为论坛">
          {/if}
          {if $item.sub_record != "0"}
          <a href="{$control_admin}?act=channel&channel_id={$item.id}" target="_self" title="{$item.brief|str_entag:'space,br'}">{$item.name|str_entag:'space,br'}</a>[{$item.sub_record}]
          {else}
          {$item.name|str_entag:'space,br'}
          {/if}
          </td>
          <td nowrap>{$item.page_record}</td>
          <td nowrap>{$item.rank}</td>
          <td nowrap>
            <a href="{$control_admin}?act=channel&ope=amend&channel_id={$item.id}&pag={$get.pag}" target="_self">
            {if $item.if_turn == "1"}<span class="state_yes">是</span>{else}<span class="state_cancel">否</span>{/if}
            </a>
          </td>
          <td nowrap>
            {if $item.if_enable == "1"}
              <span style="color:#00AA00;" title="当前状态为开启!">开</span>
              <a href="{$control_admin}?act=channel&ope=if_enable&channel_id={$item.id}&if_enable=2&pag={$get.pag}" target="_self"><span style="color:#898989;" title="将状态更改为关闭!">关</span></a>
            {else}
              <a href="{$control_admin}?act=channel&ope=if_enable&channel_id={$item.id}&if_enable=1&pag={$get.pag}" target="_self"><span style="color:#898989;" title="将状态更改为开启!">开</span></a>
              <span style="color:#EA7408;" title="当前状态为关闭!">关</span>
            {/if}
          </td>
          <td nowrap>
            {if $item.if_lock == "1"}
              <span style="color:#00AA00;" title="当前状态为开启!">开</span>
              <a href="{$control_admin}?act=channel&ope=if_lock&channel_id={$item.id}&if_lock=2&pag={$get.pag}" target="_self"><span style="color:#898989;" title="将状态更改为关闭!">关</span></a>
            {else}
              <a href="{$control_admin}?act=channel&ope=if_lock&channel_id={$item.id}&if_lock=1&pag={$get.pag}" target="_self"><span style="color:#898989;" title="将状态更改为开启!">开</span></a>
              <span style="color:#EA7408;" title="当前状态为关闭!">关</span>
            {/if}
          </td>
          <td nowrap>
            {if $item.if_show == "1"}
              <span style="color:#00AA00;" title="当前显示为开启!">开</span>
              <a href="{$control_admin}?act=channel&ope=if_show&channel_id={$item.id}&if_show=2&pag={$get.pag}" target="_self"><span style="color:#898989;" title="将显示更改为关闭!">关</span></a>
            {else}
              <a href="{$control_admin}?act=channel&ope=if_show&channel_id={$item.id}&if_show=1&pag={$get.pag}" target="_self"><span style="color:#898989;" title="将显示更改为开启!">开</span></a>
              <span style="color:#EA7408;" title="当前显示为关闭!">关</span>
            {/if}
          </td>
          <td nowrap>
            {if $item.if_recommend == "1"}
              <span style="color:#00AA00;" title="当前推荐为开启!">开</span>
              <a href="{$control_admin}?act=channel&ope=if_recommend&channel_id={$item.id}&if_recommend=2&pag={$get.pag}" target="_self"><span style="color:#898989;" title="将推荐更改为关闭!">关</span></a>
            {else}
              <a href="{$control_admin}?act=channel&ope=if_recommend&channel_id={$item.id}&if_recommend=1&pag={$get.pag}" target="_self"><span style="color:#898989;" title="将推荐更改为开启!">开</span></a>
              <span style="color:#EA7408;" title="当前推荐为关闭!">关</span>
            {/if}
          </td>
          <td nowrap>
            {if $item.if_add == "1"}
              <span style="color:#00AA00;" title="当前发帖为开启!">开</span>
              <a href="{$control_admin}?act=channel&ope=if_add&channel_id={$item.id}&if_add=2&pag={$get.pag}" target="_self"><span style="color:#898989;" title="将发帖更改为关闭!">关</span></a>
            {else}
              <a href="{$control_admin}?act=channel&ope=if_add&channel_id={$item.id}&if_add=1&pag={$get.pag}" target="_self"><span style="color:#898989;" title="将发帖更改为开启!">开</span></a>
              <span style="color:#EA7408;" title="当前发帖为关闭!">关</span>
            {/if}
          </td>
          <td nowrap>
            {if $item.if_guest == "1"}
              <span style="color:#00AA00;" title="当前游客发帖为开启!">开</span>
              <a href="{$control_admin}?act=channel&ope=if_guest&channel_id={$item.id}&if_guest=2&pag={$get.pag}" target="_self"><span style="color:#898989;" title="将游客发帖更改为关闭!">关</span></a>
            {else}
              <a href="{$control_admin}?act=channel&ope=if_guest&channel_id={$item.id}&if_guest=1&pag={$get.pag}" target="_self"><span style="color:#898989;" title="将游客发帖更改为开启!">开</span></a>
              <span style="color:#EA7408;" title="当前游客发帖为关闭!">关</span>
            {/if}
          </td>
          <td nowrap>
            {if $item.if_anonymous == "1"}
              <span style="color:#00AA00;" title="当前匿名发帖为开启!">开</span>
              <a href="{$control_admin}?act=channel&ope=if_anonymous&channel_id={$item.id}&if_anonymous=2&pag={$get.pag}" target="_self"><span style="color:#898989;" title="将匿名发帖更改为关闭!">关</span></a>
            {else}
              <a href="{$control_admin}?act=channel&ope=if_anonymous&channel_id={$item.id}&if_anonymous=1&pag={$get.pag}" target="_self"><span style="color:#898989;" title="将匿名发帖更改为开启!">开</span></a>
              <span style="color:#EA7408;" title="当前匿名发帖为关闭!">关</span>
            {/if}
          </td>
          <td nowrap>
            <a href="{$control_admin}?act=channel&ope=add&channel_id={$item.id}&pag={$get.pag}" target="_self"><img src="{$dir_images_admin}/icon_add.gif" border="0" alt="增" title="添加下属版块" /></a>
            <a href="{$control_admin}?act=channel&ope=move&channel_id={$item.id}&pag={$get.pag}" target="_self"><img src="{$dir_images_admin}/icon_arrow.gif" border="0" alt="移" title="移动此版块" /></a>
            <a href="{$control_admin}?act=channel&ope=amend&channel_id={$item.id}&pag={$get.pag}" target="_self"><img src="{$dir_images_admin}/icon_edit.gif" border="0" alt="改" title="修改" /></a>
            <a href="{$control_admin}?act=manage&channel_id={$item.id}" target="_self"><img src="{$dir_images_admin}/icon_member.gif" border="0" alt="版" title="版主" /></a>
            <a href="{$control_admin}?act=channel&ope=del&channel_id={$item.id}&pag={$get.pag}" target="_self" onClick="return confirm('真的要删除记录?')"><img src="{$dir_images_admin}/icon_delete.gif" border="0" alt="删" title="删除记录"></a>
          </td>
        </tr>
        {else}
        <tr align="center" class="block_list" onmouseover="this.className='block_list_over'" onmouseout="this.className='block_list'">
          <td nowrap><span class="disable">{$item.id}</span></td>
          <td align="left">
          {if $item.type == "2"}
          <img id="type" border="0" align="absmiddle" src="{$dir_images_admin}/icon_folder.gif" alt="分区" title="类型为分区">
          {else}
          <img id="type" border="0" align="absmiddle" src="{$dir_images_admin}/icon_topic.gif" alt="论坛" title="类型为论坛">
          {/if}
          {if $item.sub_record != "0"}
          <a href="{$control_admin}?act=channel&channel_id={$item.id}" target="_self" title="{$item.brief|str_entag:'space,br'}"><span class="disable">{$item.name|str_entag:'space,br'}</span></a>[{$item.sub_record}]
          {else}
          <span class="disable">{$item.name|str_entag:'space,br'}</a>
          {/if}
          </td>
          <td nowrap><span class="disable">{$item.page_record}</span></td>
          <td nowrap><span class="disable">{$item.rank}</span></td>
          <td nowrap>
            {if $item.if_turn == "1"}<span class="state_yes">是</span>{else}<span class="state_cancel">否</span>{/if}
          </td>
          <td nowrap>
            {if $item.if_enable == "1"}
              <span class="disable_salient" title="当前状态为开启!">开</span>
              <span class="disable">关</span>
            {else}
              <span class="disable">开</span>
              <span class="disable_salient" title="当前状态为关闭!">关</span>
            {/if}
          </td>
          <td nowrap>
            {if $item.if_lock == "1"}
              <span class="disable_salient" title="当前状态为开启!">开</span>
              <span class="disable">关</span>
            {else}
              <span class="disable">开</span>
              <span class="disable_salient" title="当前状态为关闭!">关</span>
            {/if}
          </td>
          <td nowrap>
            {if $item.if_show == "1"}
              <span class="disable_salient" title="当前显示为开启!">开</span>
              <span class="disable">关</span>
            {else}
              <span class="disable">开</span>
              <span class="disable_salient" title="当前显示为关闭!">关</span>
            {/if}
          </td>
          <td nowrap>
            {if $item.if_recommend == "1"}
              <span class="disable_salient" title="当前推荐为开启!">开</span>
              <span class="disable">关</span>
            {else}
              <span class="disable">开</span>
              <span class="disable_salient" title="当前推荐为关闭!">关</span>
            {/if}
          </td>
          <td nowrap>
            {if $item.if_add == "1"}
              <span class="disable_salient" title="当前发帖为开启!">开</span>
              <span class="disable">关</span>
            {else}
              <span class="disable">开</span>
              <span class="disable_salient" title="当前发帖为关闭!">关</span>
            {/if}
          </td>
          <td nowrap>
            {if $item.if_guest == "1"}
              <span class="disable_salient" title="当前游客发帖为开启!">开</span>
              <span class="disable">关</span>
            {else}
              <span class="disable">开</span>
              <span class="disable_salient" title="当前游客发帖为关闭!">关</span>
            {/if}
          </td>
          <td nowrap>
            {if $item.if_anonymous == "1"}
              <span class="disable_salient" title="当前匿名发帖为开启!">开</span>
              <span class="disable">关</span>
            {else}
              <span class="disable">开</span>
              <span class="disable_salient" title="当前匿名发帖为关闭!">关</span>
            {/if}
          </td>
          <td nowrap>
            <span class="disable">添加</span>
            <span class="disable">移动</span>
            <span class="disable">编辑</span>
            <span class="disable">版主</span>
            <span class="disable">删除</span>
          </td>
        </tr>
        {/if}
        {/foreach}
      </table>
      </div>
      {/if}

    </td>
  </tr>
</table>
{include file="pub_footer.htm"}